//
//  JOContectCellTableViewCell.m
//  私人通讯录
//
//  Created by song on 15/1/24.
//  Copyright (c) 2015年 song. All rights reserved.
//

#import "JOContectCellTableViewCell.h"
#import "JOContects.h"

@interface JOContectCellTableViewCell ()

@property(nonatomic ,weak )UIView *div;
@end

@implementation JOContectCellTableViewCell


+(instancetype)contectCellWithTableView:(UITableView *)tableview
{
     JOContectCellTableViewCell *cell =  [tableview dequeueReusableCellWithIdentifier:@"contects"];
    return  cell;
}


-(void)setContect:(JOContects *)contect
{
    _contect = contect;
    
    self.textLabel.text = contect.name;
    self.detailTextLabel.text = contect.tel;
}



- (void)awakeFromNib {
    UIView *div =[[UIView alloc]init];
    div.backgroundColor = [UIColor grayColor];
    self.div = div;
    [self.contentView addSubview:div];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    CGFloat divX = 0;
    CGFloat divY =  self.frame.size.height;
    CGFloat divW = self.frame.size.width;
    CGFloat divH =1;
    self.div.frame = CGRectMake(divX, divY, divW, divH);
}

@end
